package main

import (
	_ "github.com/joho/godotenv/autoload"
	"lib/mall/v1/configs"
	"lib/mall/v1/lib"
	"lib/mall/v1/middleware"
	"lib/mall/v1/router"
)

func main() {
	app := lib.NewServer()
	config := configs.NewConfig()
	app.Use(middleware.GetMiddlewares()...) // 使用中间件
	router.InitRouter(app)
	app.Run(config.Host + ":" + config.Port) // 监听并在 0.0.0.0:8080 上启动服务
}
